package org.tlipoca.smsteamstore.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.genntii.smdomain.dto.SteamAppItemDTO;
import org.genntii.smdomain.entity.SteamAppDetail;
import org.genntii.smdomain.entity.SteamStore;

import java.util.ArrayList;

@Mapper
public interface SteamStoreMapper extends BaseMapper<SteamStore> {

    void insertBatch(ArrayList<SteamAppItemDTO> apps);

    void updateDLCBatch(ArrayList<SteamAppItemDTO> apps);

    ArrayList<SteamStore> randRecommend();

    @Delete("delete from Steam_Store")
    void deleteTable();

    @Select("select * from Steam_Store limit 75000")
    ArrayList<SteamStore> selectList();

    @Select("select * from Steam_Store where appid = #{id};")
    SteamStore selectByAppid(Integer id);

    void updateSteamStoreBatch(ArrayList<SteamStore> steamStores);

    @Select("select appid from Steam_Store limit 94312,1830270;")
    ArrayList<Integer> selectAppidList();

    ArrayList<SteamStore> getSteamStoreListByIds(ArrayList<Integer> ids);


    ArrayList<SteamStore> selectListByAppid(ArrayList<Integer> appids);
}
